using UnityEngine;
using System.Collections;

public class ScreenUtils {

	private ScreenUtils(){}
		
	//Lembrar que o valor é sempre entre 0 a 1
	//Pois é uma porcentagem do tamanho da tela
	static public Rect ScaledRect(float x, float y, float width, float height) {
					
		float screenWidth = (float)(Screen.width);
		float screenHeight = (float)(Screen.height);
		
		x *= screenHeight;
		y *= screenWidth;
		width  *= screenWidth;
	    height *= screenHeight;
	    
	    return new Rect(x,y,width,height);
	}
	
	static public float ScaleWithWidth(float width) {
		return (width *=  (float)(Screen.width));
	}
	
	static public float ScaleWithHeight(float height) {
		return (height *=  (float)(Screen.height));
	}
}
